package com.huineta.business.modules.job.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huineta.business.modules.job.domain.SysJobLog;
import com.huineta.business.modules.job.mapper.SysJobLogMapper;
import com.huineta.business.modules.job.param.SysJobLogRequest;
import com.huineta.business.common.web.base.page.PageResponse;
import com.huineta.business.common.web.base.page.Pageable;
import com.huineta.business.modules.job.service.ISysJobLogService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

/**
 * Author:       Dmm Lee< bclassline@gmail.com >
 * Date:         2022/11/28
 * Description:  任务日志服务实现
 */
@Service
public class SysJobLogServiceImpl extends ServiceImpl<SysJobLogMapper, SysJobLog> implements ISysJobLogService {

    @Resource
    private SysJobLogMapper sysJobLogMapper;

    @Override
    public List<SysJobLog> list(SysJobLogRequest request) {
        return sysJobLogMapper.selectJobLog(request);
    }

    @Override
    public PageResponse<SysJobLog> page(SysJobLogRequest request) {
        return Pageable.of(request,(()-> sysJobLogMapper.selectJobLog(request)));
    }
}
